
import {v4 as uuidv4} from 'uuid'
// 生成唯一字符串，持久存储
export const getUUID = ()=>{
    //先从本地春初获取uuid
    let uuid_token = localStorage.getItem('UUIDTOKEN')

    // 没有
    if(!uuid_token){
        uuid_token = uuidv4();
        localStorage.setItem('UUIDTOKEN',uuid_token);
    }
    return uuid_token
}